package com.idealighter.game.recharge.struct;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

import lombok.Data;

@Data
public class ValidationResult {
  private int status;
  private String environment;
  private Receipt receipt;

  @Data
  public static class Receipt {
    @JsonProperty("receipt_type")
    private String receiptType;
    @JsonProperty("adam_id")
    private int adamId;
    @JsonProperty("app_item_id")
    private int appItemId;
    @JsonProperty("bundle_id")
    private String bundleId;
    @JsonProperty("application_version")
    private String applicationVersion;
    @JsonProperty("download_id")
    private int downloadId;
    @JsonProperty("version_external_identifier")
    private int versionExternalIdentifier;
    @JsonProperty("receipt_creation_date")
    private String receiptCreationDate;
    @JsonProperty("receipt_creation_date_ms")
    private String receiptCreationDateMs;
    @JsonProperty("receipt_creation_date_pst")
    private String receiptCreationDatePst;
    @JsonProperty("request_date")
    private String requestDate;
    @JsonProperty("request_date_ms")
    private String requestDateMs;
    @JsonProperty("request_date_pst")
    private String requestDatePst;
    @JsonProperty("original_purchase_date")
    private String originalPurchaseDate;
    @JsonProperty("original_purchase_date_ms")
    private String originalPurchaseDateMs;
    @JsonProperty("original_purchase_date_pst")
    private String originalPurchaseDatePst;
    @JsonProperty("original_application_version")
    private String originalApplicationVersion;
    @JsonProperty("in_app")
    private List<InApp> inApp;
  }

  @Data
  public static class InApp {
    @JsonProperty("quantity")
    private String quantity;
    @JsonProperty("product_id")
    private String productId;
    @JsonProperty("transaction_id")
    private String transactionId;
    @JsonProperty("original_transaction_id")
    private String originalTransactionId;
    @JsonProperty("purchase_date")
    private String purchaseDate;
    @JsonProperty("purchase_date_ms")
    private String purchaseDateMs;
    @JsonProperty("purchase_date_pst")
    private String purchaseDatePst;
    @JsonProperty("original_purchase_date")
    private String originalPurchaseDate;
    @JsonProperty("original_purchase_date_ms")
    private String originalPurchaseDateMs;
    @JsonProperty("original_purchase_date_pst")
    private String originalPurchaseDatePst;
    @JsonProperty("is_trial_period")
    private String isTrialPeriod;
  }
}
